Either

interface Either<T1, T2>

Realization of this interface will contains at least one not null - optionalT1 or optionalT2

See also

Properties

Link copied to clipboard
abstract val optionalT1: Optional<T1>
Link copied to clipboard
abstract val optionalT2: Optional<T2>
Link copied to clipboard
open val t1OrNull: T1?
Link copied to clipboard
open val t2OrNull: T2?

Inheritors

EitherFirst
Link copied to clipboard
EitherSecond
Link copied to clipboard

Extensions

mapOnFirst
Link copied to clipboard
inline fun <T1, R> Either<T1, *>.mapOnFirst(block: (T1) -> R): R?
inline fun <T1, R> Either<T1, *>.mapOnFirst(block: (T1) -> R): R?
inline fun <T1, R> Either<T1, *>.mapOnFirst(block: (T1) -> R): R?
mapOnSecond
Link copied to clipboard
inline fun <T2, R> Either<*, T2>.mapOnSecond(block: (T2) -> R): R?
inline fun <T2, R> Either<*, T2>.mapOnSecond(block: (T2) -> R): R?
inline fun <T2, R> Either<*, T2>.mapOnSecond(block: (T2) -> R): R?